import axios from '@/libs/axios1'
let jsonHeaders = { 'content-type': 'application/json;charset=UTF-8' }
let base = '/testplatform/productComponentVulnerabilityImpact'

// 创建漏洞的可用服务
export const addProductComponentVulnerabilityImpact = data => {
  return axios({
    url: `${base}/add`,
    method: 'POST',
    data,
    headers: jsonHeaders,
  })
}

// 修改漏洞的可用服务
export const updateProductComponentVulnerabilityImpact = data => {
  return axios({
    url: `${base}/update`,
    method: 'PUT',
    data,
    headers: jsonHeaders,
  })
}

// 查询漏洞可用服务的详情
export const getProductComponentVulnerabilityImpactDetail = (id, vulnerabilityId) => {
  return axios({
    url: `${base}/${id}/${vulnerabilityId}`,
    method: 'GET',
    headers: jsonHeaders,
  })
}